<%@ page import="com.nebula.common.Const" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title><%=Const.SYSTEM_NAME%>-图标管理</title>
    <jsp:include page="../header.jsp"/>
    <style>
        .center {
            width: 80%;
            height: 80%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 10px;
        }
    </style>
</head>
<body>
<div class="container-fluid p-20">
    <div class="row">
        <div class="col-xs-8">
            <table id="icon-dg"></table>
        </div>
    </div>
</div>

<div id="add" style="overflow: hidden;position: relative">
    <div class="center">
        <form action="" class="form-horizontal mt-10">
            <div class="form-group">
                <label for="iconCls" class="col-sm-2 control-label">图标类ID</label>
                <div class="col-sm-10">
                    <select name="iconPrefix" id="iconPrefix" class="form-control"
                            style="width: 30%;display: inline-block"
                            title="图标前缀" onchange="change()">
                        <option value="icon-hamburg-">icon-hamburg-</option>
                        <option value="icon-">icon-</option>
                    </select>
                    <input type="text" class="form-control" id="iconCls" placeholder="图标类ID"
                           style="width: 69%;display: inline-block" autocomplete="off" oninput="change()">
                </div>
            </div>
            <div class="form-group">
                <label for="iconCls" class="col-sm-2 control-label">图标预览</label>
                <div class="col-sm-10">
                    <span id="showIcon" style="vertical-align: middle"></span>
                </div>
            </div>
            <div class="form-group">
                <label for="desc" class="col-sm-2 control-label">图标说明</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="desc" placeholder="图标说明" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="button" class="btn btn-primary" id="addIcon"><i class="fa fa-plus"></i>&nbsp;添加
                    </button>
                    <button type="button" class="btn btn-info" id="addIconContinue"><i
                            class="fa fa-plus"></i>&nbsp;添加并继续
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<div id="edit" style="overflow: hidden;position: relative">
    <div class="center">
        <input type="hidden" class="form-control" id="iconId">
        <form action="" class="form-horizontal mt-10">
            <div class="form-group">
                <label for="desc" class="col-sm-2 control-label">图标预览</label>
                <div class="col-sm-10">
                    <span id="iconShow" style="vertical-align: middle"></span>
                </div>
            </div>
            <div class="form-group">
                <label for="desc" class="col-sm-2 control-label">图标说明</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="descEdit" placeholder="图标说明" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="button" class="btn btn-primary" id="editIcon"><i class="fa fa-floppy-o"></i>&nbsp;保存
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<jsp:include page="../footer.jsp"/>
<script src="${pageContext.request.contextPath}/js/custom/icon-setting.js"></script>
</body>
</html>
